Disable the option to select an update channel when server has a valid subscription.
authorCamila Ayres <hello@camilasan.com>
Mon, 17 Feb 2025 15:47:15 +0000 (16:47 +0100)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Tue, 18 Feb 2025 09:48:42 +0000 (09:48 +0000)
Signed-off-by: Camila Ayres <hello@camilasan.com>
src/gui/generalsettings.cpp

index 843be0dd568b65dd9794f5d4ec7b5eee588f1ccc..d6aec9821f9888a0cbfbd3fea0c91ed8bc970b6d 100644 (file)
@@ -327,12 +327,13 @@ void GeneralSettings::loadMiscSettings()
 void GeneralSettings::loadUpdateChannelsList() {
     ConfigFile cfgFile;
     const auto validUpdateChannels = cfgFile.validUpdateChannels();
-    if (_currentUpdateChannelList.isEmpty() || (_currentUpdateChannelList != validUpdateChannels && !cfgFile.serverHasValidSubscription())) {
+    if (_currentUpdateChannelList.isEmpty() || _currentUpdateChannelList != validUpdateChannels){
         _currentUpdateChannelList = validUpdateChannels;
         _ui->updateChannel->clear();
         _ui->updateChannel->addItems(_currentUpdateChannelList);
         const auto currentUpdateChannelIndex = _currentUpdateChannelList.indexOf(cfgFile.currentUpdateChannel());
         _ui->updateChannel->setCurrentIndex(currentUpdateChannelIndex != -1 ? currentUpdateChannelIndex : 0);
+        _ui->updateChannel->setDisabled(cfgFile.serverHasValidSubscription());
         connect(_ui->updateChannel, &QComboBox::currentTextChanged, this, &GeneralSettings::slotUpdateChannelChanged);
     }
 }